# Started with builtin defaults from ./avr_isp.pl, V0.9e, Tue Mar 23 14:22:17 2010
# Add your own macros here and send them upstream, if you like.
{
  'mega16' => {
    'BLB0mode=1' => [ 'BLB0[2..1]=11', 'no restrictions' ],
    'BLB0mode=2' => [ 'BLB0[2..1]=10', 'no SPM write to App' ],
    'BLB0mode=3' => [ 'BLB0[2..1]=00', 'no SPM write to App, no LPM from Boot read App, no App Interrupts in Boot' ],
    'BLB0mode=4' => [ 'BLB0[2..1]=01', 'no LPM from Boot read App, no App Interrupts in Boot' ],
    'BLB1mode=1' => [ 'BLB0[2..1]=11', 'no restrictions' ],
    'BLB1mode=2' => [ 'BLB0[2..1]=10', 'no SPM write to Boot' ],
    'BLB1mode=3' => [ 'BLB0[2..1]=00', 'no SPM write to Boot, no LPM from App read Boot, no Boot Interrupts in App' ],
    'BLB1mode=4' => [ 'BLB0[2..1]=01', 'no LPM from App read Boot, no Boot Interrupts in App' ],
    'BOD=2.7V' => [ 'BODLEVEL=1, BODEN=0', 'brown-out detector at 2.7V' ],
    'BOD=4.0V' => [ 'BODLEVEL=0, BODEN=0', 'brown-out detector at 2.7V' ],
    'BOD=off' => [ 'BODLEVEL=0, BODEN=1', 'brown-out detector disabled' ],
    'LBmode=1' => [ 'LB[2..1]=11', 'all unlocked' ],
    'LBmode=2' => [ 'LB[2..1]=10', 'flash+eeprom: no write, fuses locked' ],
    'LBmode=3' => [ 'LB[2..1]=00', 'flash+eeprom: no write or verify, fuses locked' ],
    '__no_std__' => 1,
    'clock=0.4-0.9mhz' => [ 'CKSEL=1010,CKOPT=1', 'external quartz 0.4-0.9Mhz XTAL1 XTAL2' ],
    'clock=0.9-3.0mhz' => [ 'CKSEL=1100,CKOPT=1', 'external quartz 0.9-3.0Mhz XTAL1 XTAL2' ],
    'clock=1.0-16.0mhz' => [ 'CKSEL=1110,CKOPT=0', 'external quartz >= 1.0Mhz XTAL1 XTAL2' ],
    'clock=3.0-8.0mhz' => [ 'CKSEL=1110,CKOPT=1', 'external quartz 3.0-8.0Mhz XTAL1 XTAL2' ],
    'clock=32768hz' => [ 'CKSEL=1001', 'external slow quartz 32.768khz XTAL1 XTAL2' ],
    'clock=ext_clock' => [ 'CKSEL=0000', 'external clock via XTAL1' ],
    'clock=i1mhz' => [ 'CKSEL=0001', 'internal RC-osc 1Mhz' ],
    'clock=i2mhz' => [ 'CKSEL=0010', 'internal RC-osc 2Mhz' ],
    'clock=i4mhz' => [ 'CKSEL=0011', 'internal RC-osc 4Mhz' ],
    'clock=i8mhz' => [ 'CKSEL=0100', 'internal RC-osc 8Mhz' ]
  },
  'mega8' => {
    '__no_std__' => 1,
    'clock=0.4-0.9mhz' => [ 'CKSEL=1010,CKOPT=1', 'external quartz 0.4-0.9Mhz XTAL1 XTAL2' ],
    'clock=0.9-3.0mhz' => [ 'CKSEL=1100,CKOPT=1', 'external quartz 0.9-3.0Mhz XTAL1 XTAL2' ],
    'clock=1.0-16.0mhz' => [ 'CKSEL=1110,CKOPT=0', 'external quartz >= 1.0Mhz XTAL1 XTAL2' ],
    'clock=3.0-8.0mhz' => [ 'CKSEL=1110,CKOPT=1', 'external quartz 3.0-8.0Mhz XTAL1 XTAL2' ],
    'clock=32768hz' => [ 'CKSEL=1001', 'external slow quartz 32.768khz XTAL1 XTAL2' ],
    'clock=ext_clock' => [ 'CKSEL=0000', 'external clock via XTAL1' ],
    'clock=i1mhz' => [ 'CKSEL=0001', 'internal RC-osc 1Mhz' ],
    'clock=i2mhz' => [ 'CKSEL=0010', 'internal RC-osc 2Mhz' ],
    'clock=i4mhz' => [ 'CKSEL=0011', 'internal RC-osc 4Mhz' ],
    'clock=i8mhz' => [ 'CKSEL=0100', 'internal RC-osc 8Mhz' ]
  },
  'std' => {
    'BOD=1.8V' => [ 'BODLEVEL[2..0]=110', 'brown-out detector at 1.8V' ],
    'BOD=2.7V' => [ 'BODLEVEL[2..0]=101', 'brown-out detector at 2.7V' ],
    'BOD=4.3V' => [ 'fuse_h.BODLEVEL[2..0]=100', 'brown-out detector at 4.3V' ],
    'BOD=off' => [ 'BODLEVEL[2..0]=111', 'brown-out detector disabled' ],
    'LBmode=1' => [ 'LB[2..1]=11', 'all unlocked' ],
    'LBmode=2' => [ 'LB[2..1]=10', 'flash+eeprom: no write, fuses locked' ],
    'LBmode=3' => [ 'LB[2..1]=00', 'flash+eeprom: no write or verify, fuses locked' ],
    'clock=0.5mhz' => [ 'CKSEL=1000,CKDIV8=1', 'external quartz 0.5Mhz XTAL1 XTAL2' ],
    'clock=1.8432mhz' => [ 'CKSEL=1010,CKDIV8=1', 'external quartz 0.9-3Mhz XTAL1 XTAL2' ],
    'clock=11.0592mhz' => [ 'CKSEL=1110,CKDIV8=1', 'external quartz 8-20Mhz XTAL1 XTAL2' ],
    'clock=128khz' => [ 'CKSEL=0011,CKDIV8=1', 'internal WDT-osc' ],
    'clock=12mhz' => [ 'CKSEL=1110,CKDIV8=1', 'external quartz 8-20Mhz XTAL1 XTAL2' ],
    'clock=14.7456mhz' => [ 'CKSEL=1110,CKDIV8=1', 'external quartz 8-20Mhz XTAL1 XTAL2' ],
    'clock=16khz' => [ 'CKSEL=0011,CKDIV8=0', 'internal WDT-osc /8' ],
    'clock=16mhz' => [ 'CKSEL=1110,CKDIV8=1', 'external quartz 8-20Mhz XTAL1 XTAL2' ],
    'clock=18.4320mhz' => [ 'CKSEL=1110,CKDIV8=1', 'external quartz 8-20Mhz XTAL1 XTAL2' ],
    'clock=18.432mhz' => [ 'CKSEL=1110,CKDIV8=1', 'external quartz 8-20Mhz XTAL1 XTAL2' ],
    'clock=1mhz' => [ 'CKSEL=1010,CKDIV8=1', 'external quartz 0.9-3Mhz XTAL1 XTAL2' ],
    'clock=2.5mhz' => [ 'CKSEL=1110,CKDIV8=0', 'external quartz 8-20Mhz XTAL1 XTAL2 /8' ],
    'clock=20mhz' => [ 'CKSEL=1110,CKDIV8=1', 'external quartz 8-20Mhz XTAL1 XTAL2' ],
    'clock=2mhz' => [ 'CKSEL=1010,CKDIV8=1', 'external quartz 0.9-3Mhz XTAL1 XTAL2' ],
    'clock=3.6864mhz' => [ 'CKSEL=1100,CKDIV8=1', 'external quartz 3-8Mhz XTAL1 XTAL2' ],
    'clock=4mhz' => [ 'CKSEL=1100,CKDIV8=1', 'external quartz 3-8Mhz XTAL1 XTAL2' ],
    'clock=500000hz' => [ 'CKSEL=1000,CKDIV8=1', 'external quartz 0.5Mhz XTAL1 XTAL2' ],
    'clock=500khz' => [ 'CKSEL=1000,CKDIV8=1', 'external quartz 0.5Mhz XTAL1 XTAL2' ],
    'clock=7.3728mhz' => [ 'CKSEL=1100,CKDIV8=1', 'external quartz 3-8Mhz XTAL1 XTAL2' ],
    'clock=ext_clock' => [ 'CKSEL=0000,CKDIV8=1', 'external clock via XTAL1' ],
    'clock=i128khz' => [ 'CKSEL=0011,CKDIV8=1', 'internal WDT-osc' ],
    'clock=i16khz' => [ 'CKSEL=0011,CKDIV8=0', 'internal WDT-osc /8' ],
    'clock=i1mhz' => [ 'CKSEL=0010,CKDIV8=0', 'internal RC-osc /8' ],
    'clock=i8mhz' => [ 'CKSEL=0010,CKDIV8=1', 'internal RC-osc' ]
  },
  'tiny2313' => {
    'clock=0.5mhz' => [ 'CKSEL=0010,CKDIV8=0', 'internal RC-osc 4Mhz /8' ],
    'clock=128khz' => [ 'CKSEL=0110,CKDIV8=1', 'internal WDT-osc' ],
    'clock=16khz' => [ 'CKSEL=0110,CKDIV8=0', 'internal WDT-osc /8' ],
    'clock=1mhz' => [ 'CKSEL=0100,CKDIV8=0', 'internal RC-osc 8Mhz /8' ],
    'clock=4mhz' => [ 'CKSEL=0010,CKDIV8=1', 'internal RC-osc 4Mhz' ],
    'clock=500khz' => [ 'CKSEL=0010,CKDIV8=0', 'internal RC-osc 4Mhz /8' ],
    'clock=8mhz' => [ 'CKSEL=0100,CKDIV8=1', 'internal RC-osc 8Mhz' ],
    'clock=i0.5mhz' => [ 'CKSEL=0010,CKDIV8=0', 'internal RC-osc 4Mhz /8' ],
    'clock=i128khz' => [ 'CKSEL=0110,CKDIV8=1', 'internal WDT-osc' ],
    'clock=i16khz' => [ 'CKSEL=0110,CKDIV8=0', 'internal WDT-osc /8' ],
    'clock=i1mhz' => [ 'CKSEL=0100,CKDIV8=0', 'internal RC-osc 8Mhz /8' ],
    'clock=i4mhz' => [ 'CKSEL=0010,CKDIV8=1', 'internal RC-osc 4Mhz' ],
    'clock=i500khz' => [ 'CKSEL=0010,CKDIV8=0', 'internal RC-osc 4Mhz /8' ],
    'clock=i8mhz' => [ 'CKSEL=0100,CKDIV8=1', 'internal RC-osc 8Mhz' ]
  },
  'tinyX61' => {
    'clock=128khz' => [ 'CKSEL=0011,CKDIV8=1', 'internal WDT-osc' ],
    'clock=16khz' => [ 'CKSEL=0011,CKDIV8=0', 'internal WDT-osc /8' ],
    'clock=16mhz' => [ 'CKSEL=0001,CKDIV8=1', 'internal PLL-osc-64Mhz/4' ],
    'clock=1mhz' => [ 'CKSEL=0010,CKDIV8=0', 'internal RC-osc /8' ],
    'clock=2mhz' => [ 'CKSEL=0001,CKDIV8=0', 'internal PLL-osc-64Mhz/4 /8' ],
    'clock=32.768khz' => [ 'CKSEL=0100,CKDIV8=1', 'external slow quartz XTAL1 XTAL2' ],
    'clock=32768hz' => [ 'CKSEL=0100,CKDIV8=1', 'external slow quartz XTAL1 XTAL2' ],
    'clock=8mhz' => [ 'CKSEL=0010,CKDIV8=1', 'internal RC-osc' ],
    'clock=ext_16mhz' => [ 'CKSEL=1110,CKDIV8=1', 'external quartz 8-20Mhz XTAL1 XTAL2' ],
    'clock=i16mhz' => [ 'CKSEL=0001,CKDIV8=1', 'internal PLL-osc-64Mhz/4' ],
    'clock=i2mhz' => [ 'CKSEL=0001,CKDIV8=0', 'internal PLL-osc-64Mhz/4 /8' ]
  }
}
